<?php
 
require './system/common.php';
require './app/Lib/tuan_init.php';
$express_id = intval($_REQUEST['express_id']);
$typeNu = addslashes(trim($_REQUEST['express_sn']));
$express_info = $GLOBALS['db']->getRow('select * from '.DB_PREFIX.'express where is_effect = 1 and id = '.$express_id);
$express_info['config'] = unserialize($express_info['config']);
$typeCom = trim($express_info['config']['app_code']);
if(isset($typeCom)&&isset($typeNu)){
$AppKey = app_conf('KUAIDI_APP_KEY');
$url ='http://api.kuaidi100.com/api?id='.$AppKey.'&com='.$typeCom.'&nu='.$typeNu.'&show=2&muti=1&order=asc';
if (app_conf('KUAIDI_TYPE')==1){
$get_content = file_get_contents($url);
$powered = '查询数据由：<a href="http://kuaidi100.com" target="_blank">KuaiDi100.Com （快递100）</a> 网站提供 ';
$data['msg'] = $get_content .'<br/>'.$powered;
$data['status'] = 1;
ajax_return($data);
}else{
$data['msg'] = 'http://www.kuaidi100.com/chaxun?com='.$typeCom.'&nu='.$typeNu;
$data['status'] = 2;
ajax_return($data);
}
}else{
$data['msg'] = '查询失败，请重试';
$data['status'] = 0;
ajax_return($data);
}
exit();

?>